﻿using System.Data.Objects;

namespace ActivateYourGlutes.Data
{
    public class EntityFrameworkRepositoryBase
    {
        private readonly ObjectContext _context;

        protected ObjectContext Context { get { return _context; } }

        public EntityFrameworkRepositoryBase(string connectionString)
        {
            _context = new ObjectContext(connectionString);
        }

        public EntityFrameworkRepositoryBase(EntityFrameworkRepositoryBase existingRepository)
        {
            _context = existingRepository.Context;
        }
    }
}
